import request from '@/utils/request'

export function getCategory() {
  return request({
    url: '/dishesSeries',
    method: 'get'
  })
}

export function addCategory(data) {
  return request({
    url: '/admin/dishesSeries',
    method: 'post',
    data: data
  })
}

export function updateCategory(data) {
  return request({
    url: '/dishesSeries',
    method: 'put',
    data: data
  })
}

export function deleteCategory(id) {
  return request({
    url: '/admin/dishesSeries/' + id,
    method: 'delete'
  })
}

export function getCategoryById(id) {
  return request({
    url: '/dishesSeries/' + id,
    method: 'get'
  })
}
